-- GENERATED SPELL FOR [Corrupted Water Elemental] --


function spell0_21428(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21428', 7000, 1)
end

function spell1_21428(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(35194,pUnit)
pUnit:RegisterEvent('Sorts_21428', 654, 1)
end

function Sorts_21428(pUnit, Event)
local choix_sorts_21428 = math.random(0, 1)
if choix_sorts_21428 == 0 then
pUnit:RegisterEvent('spell0_21428', 1, 1)
end
if choix_sorts_21428 == 1 then
pUnit:RegisterEvent('spell1_21428', 1, 1)
end
end

function mob21428_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21428', math.random(1500, 3000), 1)
end

function mob21428_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21428_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21428_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21428, 1, 'mob21428_Action')
RegisterUnitEvent(21428, 2, 'mob21428_Leave')
RegisterUnitEvent(21428, 3, 'mob21428_Kill')
RegisterUnitEvent(21428, 4, 'mob21428_Die')
